﻿using jinmaMesProxy.DataAccess;

namespace jinmaMesProxy.Model
{
    [MyTableName("MaterialAppVouch")]
    public class MaterialAppVouch: MainDetailModel<MaterialAppVouchs>
    {

        [MyColumnName("dDate")]
        public string Date { get; set; } = DateTime.Now.ToString("yyyy-MM-dd 00:00:00.000");
        [MyColumnName("cHandler")]
        public string Approver { get; private set; } = RuntimeVariable.OptUser;
        [MyColumnName("cMaker")]
        public string Creator { get; private set; } = RuntimeVariable.OptUser;
        [MyColumnName("dVeriDate")]
        public string ApproveDate { get; set; } = DateTime.Now.ToString("yyyy-MM-dd 00:00:00.000");
        [MyColumnName("VT_ID")]
        public int TempId { get; set; }
        [MyColumnName("ireturncount")]
        public int ReturnCount { get; private set; } = 0;
        [MyColumnName("iverifystate")]
        public int VerifyState { get; private set; } = 0;
        [MyColumnName("iswfcontrolled")]
        public int SwfControlled { get; private set; } = 0;
        [MyColumnName("iPrintCount")]
        public int PrintCount { get; private set; } = 0;
        [MyColumnName("dnmaketime")]
        public string CreateTime { get; set; } = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff");
        [MyColumnName("dnverifytime")]
        public string ApproveTime { get; set; } = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff");

    }
    [MyTableName("MaterialAppVouchs")]

    public class MaterialAppVouchs :DetailModel
    {

        [MyColumnName("cInvCode")]
        public string Material { get; set; }
        [MyColumnName("iQuantity")]
        public decimal Quantity { get; set; }
        [MyColumnName("cWhCode")]
        public string Warehouse { get; set; }
        [MyColumnName("iExpiratDateCalcu")]
        public int ExpiratDateCalcu { get; private set; } = 0;
        [MyColumnName("iRowNo")]
        public int RowNo { get; set; }
        [MyColumnName("iOrderType")]
        public int OrderType { get; private set; } = 0;
        [MyColumnName("iSoType")]
        public int SoType { get; private set; } = 0;
        [MyColumnName("iPeSoType")]
        public int PeSoType { get; private set; } = 0;
        
    }
}
